/**
 * 全局配置
 */
interface Config {
  apiUrl: string;
  uploadUrl: string;
  appTitle: string;
  appLogo: string;
}

export const version = '1.0.0';

const config: Config = {
  apiUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:8098/api/doc.html' : 'http://your-production-api.com',
  uploadUrl: process.env.NODE_ENV === 'development' ? '/api/upload' : 'http://your-production-api.com/upload',
  appTitle: 'CodeWeaver',
  appLogo: 'CW',
};

/**
 * 初始化配置
 */
export const initConfig = {
  className: 'User',
  classNameLowerCase: 'user',
  author: 'lty',
  description: 'xxx管理',
  controllerPackage: 'com.lty.controller',
  daoPackage: 'com.lty.mapper',
  serviceImplPackage: 'com.lty.service.impl',
  servicePackage: 'com.lty.service',
  entityPackage: 'com.lty.model.entity',
  primaryKeyType: 'String',
  tableName: 'tableName',
  apiUrl: 'http://localhost:8088/api/v3/api-docs',
  baseUrl:'/api',
  requestMapping:''
};

export default config;

export const tipData = [
  {
    key: '1',
    label: '${className}',
    value: '大写类名'
  },
  {
    key: '2',
    label: '${classNameLowerCase}',
    value: '小写类名',
  },
  {
    key: '3',
    label: '${author}',
    value: '作者',
  },
  {
    key: '4',
    label: '${description}',
    value: '描述',
  },
  {
    key: '5',
    label: '${controllerPackage}',
    value: 'controllerPackage',
  },
  {
    key: '6',
    label: 'daoPackage',
    value: 'daoPackage',
  },
  {
    key: '7',
    label: '${serviceImplPackage}',
    value: 'serviceImplPackage',
  },
  {
    key: '8',
    label: '${servicePackage}',
    value: 'servicePackage',
  },
  {
    key: '9',
    label: '${entityPackage}',
    value: 'entityPackage',
  },
  {
    key: '10',
    label: '${primaryKeyType}',
    value: '主键类型',
  },
  {
    key: '11',
    label: '${tableName}',
    value: '表名',
  },
];

/**
 * 初始化配置
 */
export const initSqlDoc = {
  "dbName": "demo",
  "description": "数据库文档",
  "fileOutputDir": "D:/screw",
  "fileType": "WORD",
  "host": "127.0.0.1",
  "designatedTableName": [],
  "designatedTablePrefix": [],
  "designatedTableSuffix": [],
  "ignorePrefix": [],
  "ignoreSuffix": [],
  "ignoreTableName": [],
  "password": "123456",
  "port": 3306,
  "userName": "root",
  "version": "1.0.0"
};